package com.wei.shopping.dao;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageInfo;
import com.sun.org.glassfish.gmbal.ParameterNames;
import com.wei.shopping.entrty.PageResult;
import com.wei.shopping.entrty.QueryPageBean;
import com.wei.shopping.pojo.Collect;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

/**
 * @Author Wei
 * @Date 2021/4/29 14:12
 */
@Repository
public interface CollectMapper {
    /**
     * 删除收藏
     * @param colid
     */
    void delcollect(String colid);
    /**
     * 分页查询收藏列表
     * @param queryString
     * @return
     */
    Page<Collect> collectFindAll(@Param("queryString") String queryString,@Param("collectuserid") String collectuserid);

    /**
     * 添加收藏
     * @param collect
     */
    void addcollect(Collect collect);

    /**
     * 取消收藏
     * @param
     */
    void cancelcollect(@Param("commid") String commid, @Param("userid") String userid);

    /**
     * 通过commid和userid查找收藏
     * @param commid
     * @param userid
     * @return
     */
    Collect findByCommidAndUserid(@Param("commid") String commid,@Param("userid") String userid);
}
